import { Module } from '@nestjs/common';
import { RoleService } from './role.service';
import { RoleResolver } from './role.resolver';
import { Role, RoleSchema } from './entities/role.entity';
import { MongooseModule } from '@nestjs/mongoose';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { PowerModule } from '../power/power.module';

@Module({
  providers: [RoleResolver, RoleService, ConfigService],
  imports: [
    PowerModule,
    MongooseModule.forFeature([{ name: Role.name, schema: RoleSchema }]),
    ConfigModule.forRoot({
      cache: true,
    }),
  ],
  exports: [RoleService],
})
export class RoleModule { }
